FROM registry.cn-hangzhou.aliyuncs.com/wangxuancheng/golang-alpine:latest

# 设置固定的项目路径
ENV WORKDIR /app

WORKDIR $WORKDIR

ADD . .

RUN ["/bin/sh","-c","export GOPROXY=https://goproxy.cn && go mod tidy && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main main.go"]


ENTRYPOINT ["./main"]